import request from '@/utils/request'

//站内信分页列表
export function queryMailPageList(data) {
	return request({
		method: 'post',
		url: 'tbMail/queryPageList',
		headers: {
			userButton: '60a299fd74d44baebab9531d1e3dce2e'
		},
		data
	})
}

//站内信详情
export function mailDetail(id) {
	return request({
		method: 'get',
		url: 'tbMail/query/' + id,
		headers: {
			userButton: 'a07e09d385384154b4d51844c215037a'
		}
	})
}

//设置为已读
export function updateMail(data) {
	return request({
		method: 'post',
		url: 'tbMail/update',
		headers: {
			userButton: '554b662425444fdcb2380f8fe7137643'
		},
		data
	})
}

//全部标记为已读
export function updateAllMail(data) {
	return request({
		method: 'post',
		url: 'tbMail/updateAll',
		headers: {
			userButton: 'a6241c2b161742ccb58570277989b510'
		},
		data
	})
}

//查询当前用户未读站内信数量
export function getMailCount() {
	return request({
		method: 'post',
		url: 'tbMail/queryCount',
		headers: {
			userButton: 'e501849765eb4fbd96df792566b9e796'
		}
	})
}